#include "main.h"

#include "bsp_delay.h"
#include "bsp_usart.h"
#include "bsp_sys.h"

#include "bsp_led.h"
#include "bsp_exti.h"
#include "bsp_timer.h"
#include "bsp_adc.h"

#include "bluetooth_debugger.h"

int main()
{
	NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
	bsp_usart1_init(115200);
	delay_init();
	bsp_led_init();
	bsp_exti_init();
	bsp_tim3_init(10000,7200);
	bsp_adc_init();
	while(1)
	{
		tx_pack_ptr.bools[0] = rx_pack_ptr.bools[0];
		tx_pack_ptr.bools[1] = rx_pack_ptr.bools[1];
		tx_pack_ptr.bytes[0] = rx_pack_ptr.bytes[0];
		tx_pack_ptr.shorts[0] = rx_pack_ptr.shorts[0]; 
		tx_pack_ptr.integers[0] = rx_pack_ptr.integers[0]; 
		tx_pack_ptr.floats[0] = rx_pack_ptr.floats[0];
		data_send_packet(&tx_pack_ptr,usart_tx_buff);
		Serial_SendArray(usart_tx_buff,15);
		delay_ms(50);
	}
}

